#ifndef __THREEDAXIS_H__
#define __THREEDAXIS_H__
#include <d3dx9.h>

struct CUSTOMVERTEX 
{
	FLOAT x, y, z;	// position
	DWORD color;	// color
};

#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE)

class ThreeDAxis
{
public:
	ThreeDAxis() ;
	ThreeDAxis(LPDIRECT3DDEVICE9 device);
	ThreeDAxis(LPDIRECT3DDEVICE9 device, D3DXVECTOR3 orign, float xLen, float yLen, float zLen) ;
	~ThreeDAxis(void);
	HRESULT InitiVertex() ;
	void Draw() ;
	void SetDevice(LPDIRECT3DDEVICE9 device) ;

private:
	D3DXVECTOR3 m_vOrign ;
	float m_fXAxisLength ;
	float m_fYAxisLength ;
	float m_fZAxisLength ;

	LPDIRECT3DDEVICE9		m_pDirect3DDevice ;
	LPDIRECT3DVERTEXBUFFER9	m_pVertexBuffer ;
};

#endif // end __THREEDAXIS_H__